Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add writ tests #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

ci: add writ tests #39

wants to merge 2 commits into from

Conversation

ricochet
Copy link
Contributor

  • changed make target for test to depend on
    a wasm module. That way we can test both
    release and debug in the CI.
  • If I spied rust unit tests, I added those to the
    make target. We could also consider gtests
    for C++ examples in the future.

@@ -14,11 +14,12 @@ wasm:
cargo wasi build --lib $(RELFLAGS)

.PHONY: test
test: debug
test: wasm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the above comment, but opposite. Changing this dependency to "wasm" implies the target will always be built in debug mode because theRELFLAGS variable won't be set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm. I think I'm going to remove any dependency then. The thing I was trying to refactor is that when it depends on debug, it builds debug even after having just built a release (which is the module I actually want to test).

@@ -16,7 +16,7 @@ power.wasm: gen
power.c

.PHONY: test
test: debug
test: power.wasm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this dependency to power.wasm implies that the test will always be built in release mode because the DBGFLAGS variable won't be set. Perhaps we should set DBGFLAGS globally and then have the release: target clear it?

- changed make target for test to depend on
  a wasm module. That way we can test both
  release and debug in the CI.
- If I spied rust unit tests, I added those to the
  make target. We could also consider gtests
  for C++ examples in the future.
- only run pages when files change
@ricochet ricochet requested a review from pvetere July 27, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants